package com.example.bili.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/*评论表*/

public class Comments implements Serializable {
    private int id;//主键ID
    private int becment;//被评论作品/商品
    private int userId;//用户id
    private String content;//评论内容
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date cmentime;//评论时间
    private int fuId;//父级评论id
    private int typeId;//类型1商品 0作品
    //辅助字段
    private String tx;
    private String mz;
    private String dz;


    //辅助字段
    private String uavatarUrl;
    private String uname;

    public String getUavatarUrl() {
        return uavatarUrl;
    }

    public void setUavatarUrl(String uavatarUrl) {
        this.uavatarUrl = uavatarUrl;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getTx() {
        return tx;
    }

    public void setTx(String tx) {
        this.tx = tx;
    }

    public String getMz() {
        return mz;
    }

    public void setMz(String mz) {
        this.mz = mz;
    }

    public String getDz() {
        return dz;
    }

    public void setDz(String dz) {
        this.dz = dz;
    }

    @Override
    public String toString() {
        return "Comments{" +
                "id=" + id +
                ", becment=" + becment +
                ", userId=" + userId +
                ", content='" + content + '\'' +
                ", cmentime=" + cmentime +
                ", fuId=" + fuId +
                ", typeId=" + typeId +
                '}';
    }

    public Comments() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getBecment() {
        return becment;
    }

    public void setBecment(int becment) {
        this.becment = becment;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCmentime() {
        return cmentime;
    }

    public void setCmentime(Date cmentime) {
        this.cmentime = cmentime;
    }

    public int getFuId() {
        return fuId;
    }

    public void setFuId(int fuId) {
        this.fuId = fuId;
    }

    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }
}


